package com.xltt.bluetoothlib.ble.event;

import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGattCharacteristic;

import java.io.Serializable;

/**
 * Created by lx on 2017/5/2.
 */

public class OnChangeEvent implements Serializable {

    private BluetoothDevice device;
    private int requestId;
    private BluetoothGattCharacteristic characteristic;
    private boolean preparedWrite;
    private boolean responseNeeded;
    private int offset;
    private byte[] requestBytes;

    public OnChangeEvent(){}

    public OnChangeEvent(BluetoothDevice device, int requestId, BluetoothGattCharacteristic characteristic, boolean preparedWrite, boolean responseNeeded, int offset, byte[] requestBytes) {
        this.device = device;
        this.requestId = requestId;
        this.characteristic = characteristic;
        this.preparedWrite = preparedWrite;
        this.responseNeeded = responseNeeded;
        this.offset = offset;
        this.requestBytes = requestBytes;
    }

    public BluetoothDevice getDevice() {
        return device;
    }

    public void setDevice(BluetoothDevice device) {
        this.device = device;
    }

    public int getRequestId() {
        return requestId;
    }

    public void setRequestId(int requestId) {
        this.requestId = requestId;
    }

    public BluetoothGattCharacteristic getCharacteristic() {
        return characteristic;
    }

    public void setCharacteristic(BluetoothGattCharacteristic characteristic) {
        this.characteristic = characteristic;
    }

    public boolean isPreparedWrite() {
        return preparedWrite;
    }

    public void setPreparedWrite(boolean preparedWrite) {
        this.preparedWrite = preparedWrite;
    }

    public boolean isResponseNeeded() {
        return responseNeeded;
    }

    public void setResponseNeeded(boolean responseNeeded) {
        this.responseNeeded = responseNeeded;
    }

    public int getOffset() {
        return offset;
    }

    public void setOffset(int offset) {
        this.offset = offset;
    }

    public byte[] getRequestBytes() {
        return requestBytes;
    }

    public void setRequestBytes(byte[] requestBytes) {
        this.requestBytes = requestBytes;
    }
}
